package com.kim.common.Snowflakes;


/**
 * @Project: ymdx
 * @PackageName: com.ymdx.common.util
 * @FileName: SnowflakeUtil.java
 * @Description: The SnowflakeUtil is... 雪花主键生成工具类
 * @Author: esJiang
 * @Time: 2019-09-20 10:41:39
 * @Version:V0.0.1
 */
public abstract class SnowflakeUtil {

    /**
     * 生成主键 长度是18位
     *
     * @return string
     */
    public static String nextStrId() {
        return String.valueOf(nextLongId());
    }

    /**
     * 生成主键 长度是18位
     *
     * @return long
     */
    public static long nextLongId() {
        return IdGenerateUtils.getSnowflakeIdWorker().nextId();
    }
}
